#include <cmath>
#include <cstdio>
using namespace std;

int k;
long double n, a, b, c, d;

int main() {
	freopen("square.in", "r", stdin);
	freopen("square.out", "w", stdout);
	scanf("%Lf%d", &n, &k);
	d = sqrt(n * (n / 2));
	for (int i = 0; i < k; ++i) {
		double tmp = 0.0;
		if (i & 1)
			tmp = d / pow(2, i / 2);
		else
			tmp = n / pow(2, i / 2);
		if (i % 3 == 0) {
			a += 2 * (tmp);
			b += tmp;
			c += tmp;
		} else if (i % 3 == 1) {
			a += tmp;
			b += 2 * tmp;
			c += tmp;
		} else {
			a += tmp;
			b += tmp;
			c += 2 * tmp;
		}
	}
	printf("%.3Lf %.3Lf %.3Lf", a, b, c);
	fclose(stdin);
	fclose(stdout);
	return 0;
}